﻿using System;
using System.Collections.Generic;
using System.IO;
using System.Linq;
using System.Text;
using WpfHero;

namespace WpfHeroTutorial
{
    public class MyDirectory
    {
        public string FullPath { get; private set; }
        public bool IsParent { get; set; }

        public MyDirectory(string fullPath, bool isParent)
        {
            FullPath = fullPath;
            IsParent = isParent;
        }

        public string Name
        {
            get { return IsParent ? ".." : FullPath.Split(new char[] {'\\'}).Last();  }
        }

        public bool HasSong
        {
            get { return File.Exists(Utils.GetSongPath(FullPath)); }
        }
    }
}
